-- CALC_MAGIC_EVEN_ATTACK

-----------------------------------------------
--  计算魔偶攻击
-- @param  classId       魔偶id（summon表）
return function(classId)
    -- 获取圣器【会说话的人偶】的特殊属性等级
    local classId = 8121;
    local level = HolyItemsM.getExtraLevel(classId);

    -- 获取当前楼层和迷宫难度
    local dungeonId = DungeonM.getDungeonId();
    local layerFix  = DungeonAreaM.query(dungeonId, "layer_fix");
    local layer     = DungeonM.currentLayer();
    if layer > 80 then
        layer = math.modf(layer * 0.85 + 12)
    end

    local attack_coef = 8;
    if level == 2 then
        attack_coef = attack_coef + 1;
    elseif level == 3 then
        attack_coef = attack_coef + 2;
    end;

    local attack = FormulaM.invoke("CALC_DUNGEON_MONSTER_INIT_ATTACK", attack_coef, layer, layerFix);

    return attack;
end